package com.yangxk.kadmin.web.module.system.mapper;

import com.yangxk.kadmin.common.base.BaseMapper;
import com.yangxk.kadmin.web.module.system.po.Auth;
import com.yangxk.kadmin.web.module.system.pojo.AuthQuery;

import java.util.List;

public interface AuthMapper extends BaseMapper<Auth, Long>{

    List<Auth> queryAll();

    List<Auth> queryByParentId(long parentId);

    List<Auth> queryByParent(AuthQuery query);

    int deleteBatch(List<Long> ids);

    /**
     * 查询指定用户的权限列表
     *
     * create by yangxk on 2018/9/21 15:58
     */
    List<Auth> findAuthByUserId(long userId);

    int insertBatch(List<Auth> list);

    /**
     * 删除角色中被分配的对应的权限
     * create by yangxk on 2018/10/19 15:33
     */
    int deleteRoleAuth(List<Long> ids);
}